package core;

public class Message{
	private int type;
	private int r_pid;
	private long r_ip;
	private int s_pid;
	private long s_ip;
	private long timestamp;
	private String content;
	private Object attachment;
	
	public Message( int _type, int _rpid, long _rip, int _spid, long _sip, long _timestamp, String _content, Object _attach ){
		type = _type;
		r_pid = _rpid;
		r_ip = _rip;
		s_pid = _spid;
		s_ip = _sip;
		timestamp = _timestamp;
		content = _content;
		attachment = _attach;
	}
	
	// accessors
	public int get_type(){ return type; }
	public int get_receiver_pid(){ return r_pid; }
	public long get_receiver_ip(){ return r_ip; }
	public int get_sender_pid(){ return s_pid; }
	public long get_sender_ip(){ return s_ip; }
	public long get_timestamp(){ return timestamp; }
	public String get_content(){ return content; }
	public Object get_attachment(){ return attachment; }
	
	// mutator
	public void set_receiver_pid( int _rpid ){ r_pid = _rpid; }
	public void set_receiver_ip( long _rip ){ r_ip = _rip; }
}
